home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
comm2
/
mmxprtpl.lha
/
MM
/
Rexx
/
MM_ExportPlus.rexx.cmp
< prev
next >
Wrap
Text File
|
1996-04-28
|
2KB
|
11 lines
/*
$VER: MM_ExportPlus.rexx 0.23/c (28.04.96)
(C) 1995/96 Robert Hofmann
*/
arg areas;address 'MAILMANAGER';call Init;call Header;call Main;call Footer;call Quit(0);exit;Footer: procedure Expose system.;call Log();call Log('***' system.prg.id 'ended ***', '+');call Log(, '\');return;Get_Version: procedure;parse arg mode;parse value sourceline(3-mode) with . . ver .;parse var ver tst 'ß' .;if ~datatype(strip(tst, 'b', '/ce '), 'N') then if ~mode then ver = Get_Version(1);else exit 99;return ver;Header: procedure Expose system.;call Log(, '/');call Log('***' system.prg.id 'started ***', '+');call Log();return;Include_Lib: procedure Expose system.;parse arg lib, prio;if right(upper(lib), 8)~='.LIBRARY' then lib = lib'.library';if prio='' then prio = 0;if ~show('l', lib) then if ~addlib(lib, prio, -30, 0) then call Quit(20, 'Could not open' lib'!!!');return;Init:;system. = 0;MM_GetTaskPri 'system.taskpri';call pragma('p', system.taskpri);system.prg.name = 'MM_ExportPlus';system.prg.ver = Get_Version(0);system.prg.id = system.prg.name 'v'system.prg.ver
system.mm.logpre = getclip('MM_LogPre');system.prg.logpre = system.mm.logpre'|';call setclip('MM_LogPre', system.prg.logpre);call Include_Lib('rexxsupport');return;Log: procedure Expose system.;parse arg text, pre;tmp = word('PRG MM', (pre~='')+1);text = system.tmp.logpre || pre' 'text;MM_WriteLog 'text' '2';return;Main:;if pos('?', areas)>0 then signal Usage;if areas='QUEUED' then do;areas = strip(getclip('MM_EXPORT'));call setclip('MM_EXPORT', '');if areas='' then call Log(' Nothing queued...');else;do;call Log(' Exporting queued areas:' areas);call Log();do while areas~='';parse var areas exp areas;exp = strip(exp);if exp='' then iterate;MM_Export exp;MM_CleanArea exp;end;end;end;else;if strip(areas)='' then do;call Log(' Exporting all areas...');call Log();MM_Export;end;else;do;call Log(' Areas to export:' areas);call Log();do while areas~='';parse var areas exp areas;exp = strip(exp);if exp='' then iterate;MM_Export exp;end;end;return;Quit:;arg rc;call setclip('MM_LogPre', system.mm.logpre);exit rc
Usage:;rx. = '';rx.0.0 = '[rx] ';rx.0.1 = '[.rexx]';m = pos('/e', system.prg.ver)>0;say;say 'Usage:' rx.m.0 || system.prg.name || rx.m.1 'AREAS/M,QUEUED/S,SMARTEXPORT/S';say;exit